﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Plato;

namespace EShop.Client
{
    public partial class frmShopTrendChartByDay : frmBase
    {
        public frmShopTrendChartByDay()
        {
            InitializeComponent();
        }

        private void frmShopTrendChartByDay_Load(object sender, EventArgs e)
        {
        }

        private void btnDisplay_Click(object sender, EventArgs e)
        {
            //int spaceBetween = dateTimePicker2 - dateTimePicker1;
            DataTable dt = new BLL.ShopReportBLL().GetTrendChartByDay(dtBegin.Value, dtEnd.Value);
            int i = dt.Rows.Count;
            for (int j = 0; j < i; j++)
            {
                object o = dt.Rows[j]["SellTime"];
                dt.Rows[j]["SellTime"] = Convert.ToDateTime(o).ToString("MM-dd");
            }
            this.chartPanel1.DataSource = dt;
        }
    }
}
